package com.hn.kiss.admin.controller;

import com.hn.kiss.config.common.CommonResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;


@Api(tags = "UserController", description = "用户管理")
@RestController
@RequestMapping("/page")
@Validated
public class PageController {

    @ApiOperation("首页")
    @GetMapping("/index.html")
    public ModelAndView index() {
        ModelAndView mv = new ModelAndView("index");
        return mv;
    }

    @ApiOperation("登录页")
    @GetMapping("/login.html")
    public ModelAndView loginView() {
        ModelAndView mv = new ModelAndView("login");
        return mv;
    }

    @ApiOperation("登录")
    @GetMapping("/login")
    public CommonResult login() {
        return CommonResult.success("登录成功");
    }

}
